package cn.hanyx.coder.design.pattern.behavioral.memento.demo02;

import java.util.Stack;

/**
 * SnapshotHolder
 *
 * @author hanyx
 * @date 2020/07/29
 */
public class SnapshotHolder {
    private Stack<Snapshot> snaphots = new Stack<>();

    public Snapshot popSnaphots() {
        return snaphots.pop();
    }

    public void pushSnapshot(Snapshot snapshot) {
        snaphots.push(snapshot);
    }
}
